/*
 * This file contians all the variables that
 * will be shared between the user input thread (thread 1)
 * to other threads
 */
#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <unistd.h>
#include "cli_const.h"
#include "cli_resp.h"
#include "externs.h"

//max length of a user input string
#define INPUT_LEN 512

#define PROMPT_LEN 512

//variables shared with thread 1
extern RESP *t0AndT1Buf;
extern pthread_mutex_t mT0AndT1;
extern pthread_cond_t t0AndT1BufRdy;
bool needsDataSock = false;



//variables shared with thread 2
extern char *listBuf;
extern pthread_mutex_t mListBuf;
extern pthread_cond_t listBufRdy;


//universal variables
extern bool shouldExit;
extern pthread_mutex_t mShouldExit;



extern int fileSize;
extern pthread_t threads[];




void *handleInput(void*);
void handleCommand(char*, char*);
void changeDirectory(char*);
void communicateWithT1(char*);
void communicateWithT2(char*);
void updatePrompt(char*);




